<?php

use Illuminate\Support\Facades\Route;
//公众号
Route::group([],function (){
    Route::match(['get', 'post'], 'wechat/check', [\App\Http\Controllers\WechatController::class,'check']);//入口
//    Route::post('wechat/image',[\App\Http\Controllers\WechatController::class,'uploadFile']);//永久文件图片
//    Route::get('wechat/menu', [\App\Http\Controllers\WechatController::class,'createMenu']);//创建自定义菜单
    Route::get('wechat/qr',[\App\Services\WechatService::class,'qRCode']);//获取二维码
});
//求租求购
Route::group(['prefix'=>'house'],function (){
    Route::get('type',[\App\Http\Controllers\HouseController::class,'houseType']);//获取房屋类型
    Route::post('add',[\App\Http\Controllers\HouseController::class,'houseAdd'])->middleware(\App\Http\Middleware\User::class);
    Route::get('list',[\App\Http\Controllers\HouseController::class,'listHome'])->middleware(\App\Http\Middleware\RabbitmqMiddleware::class);//接口限流
    Route::get('list_house',[\App\Http\Controllers\HouseController::class,'listHouse']);//获取会话需求详情
    Route::post('address',[\App\Http\Controllers\HouseController::class,'userAddress'])->middleware(\App\Http\Middleware\User::class);//获取当前省
    Route::get('province',[\App\Http\Controllers\HouseController::class,'userProvince'])->middleware(\App\Http\Middleware\User::class);;//获取所有省
    Route::get('region',[\App\Http\Controllers\HouseController::class,'regionAddress'])->middleware(\App\Http\Middleware\User::class);;//获取区
    Route::get('phone',[\App\Http\Controllers\HouseController::class,'userPhone'])->middleware(\App\Http\Middleware\User::class);;//获取用户手机号
});
//聊天
Route::group(['prefix'=>'chat'],function (){
   Route::post('user_token',[\App\Http\Controllers\ChatController::class,'getUid'])->middleware(\App\Http\Middleware\User::class);
   Route::get('user_name',[\App\Http\Controllers\ChatController::class,'getUserName'])->middleware(\App\Http\Middleware\User::class);
   Route::get('user_image',[\App\Http\Controllers\ChatController::class,'getUserImage'])->middleware(\App\Http\Middleware\User::class);
   Route::get('left_name',[\App\Http\Controllers\ChatController::class,'getLeftName']);//获取对方的昵称
   Route::get('left_image',[\App\Http\Controllers\ChatController::class,'getLeftImage']);//获取对方的头像
});
Route::group(['prefix'=>"integral"],function (){//抽奖
   Route::post('user_integral',[\App\Http\Controllers\IntegralController::class,'integralUser'])->middleware(\App\Http\Middleware\User::class);
});
Route::group(['prefix'=>'cache'],function (){//本地缓存看过的或者聊过的人或物
   Route::get('user_cache',[\App\Http\Controllers\CacheController::class,'cacheList'])->middleware(\App\Http\Middleware\User::class);
});
